package com.gitee.freakchicken.dbapi.apiserver.conf;

import com.gitee.freakchicken.dbapi.basic.servlet.C_l2WstbTv;
import com.gitee.freakchicken.dbapi.basic.servlet.C_2w4u2UBW;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class C_e8XRuECX {

    @Value("${dbapi.api.context}")
    String gf_PiJNUD0P;

    @Autowired
    private C_l2WstbTv gf_2WApmy2C;

    @Autowired
    private C_2w4u2UBW gf_Pqt9BfaK;

    @Bean
    public ServletRegistrationBean m_F29VBSBX() {
        String lf_JaO2TJyB = String.format("/%s/*", gf_PiJNUD0P);
        ServletRegistrationBean lf_rAFhvHRK = new ServletRegistrationBean(gf_2WApmy2C);
        lf_rAFhvHRK.addUrlMappings(lf_JaO2TJyB);
        log.info("regist APIServlet servelet for {} urlMappings", lf_JaO2TJyB);
        return lf_rAFhvHRK;
    }

    @Bean
    public ServletRegistrationBean m_yVxmmyxs() {
        ServletRegistrationBean lf_eMaEF1ma = new ServletRegistrationBean(gf_Pqt9BfaK);
        lf_eMaEF1ma.addUrlMappings("/token/generate");
        log.info("regist tokenServlet servelet");
        return lf_eMaEF1ma;
    }
}
